package org.itstack.filter;

import org.itstack.BaseOrderLogic;
import org.itstack.model.Order;
import java.math.BigDecimal;

/**
 * 订单优先级过滤器
 * 根据订单类型和金额计算优先级
 */
public class OrderPriorityFilter extends BaseOrderLogic {
    
    @Override
    public String matterValue(Order order) {
        // 根据订单类型和金额计算优先级
        if ("URGENT".equals(order.getType())) {
            return "HIGH";
        } else if (order.getAmount().compareTo(new BigDecimal("5000")) > 0) {
            return "MEDIUM";
        } else {
            return "LOW";
        }
    }
}
